using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.Cecil;
using Mono.Cecil.Cil;

namespace Hiro.Interfaces
{
    /// <summary>
    /// Represents a type that can emit instructions that can instantiate a particular service instance.
    /// </summary>
    public interface IServiceEmitter
    {
        /// <summary>
        /// Emits the instructions that will instantiate a service instance.
        /// </summary>
        /// <param name="newMethod">The method that will create the service itself.</param>
        /// <param name="IL">The <see cref="CilWorker"/> that points to the instructions of the method body.</param>
        /// <param name="hostModule">The module that contains the container type.</param>
        /// <param name="currentService">The service that will be created.</param>
        /// <param name="dependencyMap">The dependency map that describes the dependencies in the current application.</param>
        void EmitService(MethodDefinition newMethod, CilWorker IL, ModuleDefinition hostModule, IService currentService, IDependencyMap dependencyMap);
    }
}
